#ifndef WIGNER_SIGNS_H
#define WIGNER_SIGNS_H
#include "../../SRC/DF_Common/array_vector_class.hpp"
#include <cmath>
// using std::complex;


namespace Wigner_signs {
double factorial(const double x);

double double_factorial(const double x);

bool is_it_triangle_integer(const int j1, const int j2, const int j3);

bool is_it_triangle(const double j1, const double j2, const double j3);

bool is_it_integer(const double x);

void Wigner_3j_tab_calc(const double j2, const double j3, const double m1,
                        const double m2, const double m3,
                        class array<double> &Wig_table);

double Wigner_3j(const double j1, const double j2, const double j3,
                 const double m1, const double m2, const double m3);
#pragma acc routine seq
double Clebsch_Gordan(const double j1, const double m1, const double j2,
                      const double m2, const double J, const double M);

void Wigner_6j_tab_calc(const double j2, const double j3, const double l1,
                        const double l2, const double l3,
                        class array<double> &Wig_table);
#pragma acc routine seq
double Wigner_6j(const double j1, const double j2, const double j3,
                 const double l1, const double l2, const double l3);
#pragma acc routine seq
double Wigner_9j(const double j1, const double j2, const double J12,
                 const double j3, const double j4, const double J34,
                 const double J13, const double J24, const double J);

} // namespace Wigner_signs

#endif
